Power analysis, such as simple power analysis (SPA) and differential power analysis (DPA), is a form of side channel attack in which an attacker externally observes power consumption of a cryptographic hardware device (e.g. a smart card, a set-top box, printer cartridges, etc.) to extract cryptographic keys and/or other secret information. Power consumption of microprocessors or other hardware performing cryptographic operations varies during the use of the cryptographic keys. Using SPA, the attacker can interpret power traces of electrical activity over time to determine which operations are being performed, e.g., squaring or multiplying, to compute a secret key. Using DPA, the attacker can obtain the cryptographic keys by analyzing power consumption measurements from multiple cryptographic operations performed by a vulnerable cryptographic hardware device. SPA and DPA attacks cannot generally be detected by a device, since the monitoring is normally passive, and the attack is non-invasive.